package com.example.demo.controller;


import java.io.IOException;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.entity.VeVe;
import com.example.demo.service.VeVeService;

@RestController
@RequestMapping("ve")
public class VeVeController {

	@Resource
	private VeVeService veVeService;
	
	@RequestMapping("update")
	public void edit(VeVe veve,HttpServletResponse resp) {
		veVeService.update(veve);
		//return "redirect:http://localhost:9999/ve/find";
		try {
			resp.sendRedirect("redirect:http://localhost:9999/ve/find");
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
